/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ClientForm.java
 *
 * Created on Aug 1, 2011, 4:22:20 AM
 */
package INTROSE_MP;

import javax.swing.JTable;

/**
 *
 * @author Paolo
 */
public class ClientForm extends javax.swing.JFrame {
    
    JTable clientTable;
    private ManagerWindow mw;
    String command;

    /** Creates new form ClientForm */
    public ClientForm(ManagerWindow mw, JTable clientTable, String command) {
        initComponents();
        this.setResizable(false);
        this.mw = mw;
        int r =  clientTable.getSelectedRow();
        this.clientTable = clientTable;
        this.command = command;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        clientIDTxt = new javax.swing.JTextField();
        clientNameTxt = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        clientAddrTxt = new javax.swing.JTextArea();
        orderFormError = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Client Form");
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel1.setText("Client ID:");
        getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(38, 16, -1, -1));

        jLabel2.setText("Client Name:");
        getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(22, 45, -1, -1));

        jLabel3.setText("Client Address:");
        getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 71, -1, -1));
        getContentPane().add(clientIDTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(96, 13, 97, -1));
        getContentPane().add(clientNameTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(101, 42, 327, -1));

        clientAddrTxt.setColumns(20);
        clientAddrTxt.setRows(5);
        jScrollPane1.setViewportView(clientAddrTxt);

        getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(104, 71, 324, 41));

        orderFormError.setForeground(new java.awt.Color(255, 0, 0));
        orderFormError.setText("*All fields must have values.");
        orderFormError.setToolTipText("Please ensure that your login details are correct.");
        getContentPane().add(orderFormError, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 129, -1, -1));

        jButton1.setText("Cancel");
        getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(357, 125, -1, -1));

        jButton2.setText("Save");
        getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(289, 125, -1, -1));

        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/BG.jpg"))); // NOI18N
        getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(-340, 0, 780, 170));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    /**public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new ClientForm().setVisible(true);
            }
        });
    }**/
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea clientAddrTxt;
    private javax.swing.JTextField clientIDTxt;
    private javax.swing.JTextField clientNameTxt;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel orderFormError;
    // End of variables declaration//GEN-END:variables
}
